

<%@page import="jMail.Mail"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <title>invio form mail</title>

    </head>

    <body>


        <jsp:useBean id="mail" scope="session" class="jMail.Mail" />
        <jsp:setProperty name="mail" property="from" param="from" />
        <jsp:setProperty name="mail" property="to" value="fashion.whattowear@gmail.com" />
        <jsp:setProperty name="mail" property="smtpServ" value="smtp.gmail.com" />
        <jsp:setProperty name="mail" property="subject" param="subject" />
        <jsp:setProperty name="mail" property="message" param="message" />


        <%
            String to = mail.getFrom();
            int result;
            result = mail.send();
            if (result == 0) {
                out.println(" Mail Successfully Sent to " + to);
            } else {
                out.println(" Mail NOT Sent to " + to);
            }
        %>

    </body>
</html>